<nav class="navbar navbar-inverse navbar-menu" role="navigation" ng-controller="sidebarController">
	<div class="container"> 
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
					data-target="#menu-navbar-collapse">
				<span class="sr-only">切换导航</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
		</div>
		<div class="collapse navbar-collapse" id="menu-navbar-collapse">
			<ul class="nav navbar-nav">
				<li ng-class="getMenuItemPropClasses(item)" ng-repeat="item in menus" ng-include="'menuTemplate.html'"></li>
				<!-- <li class="active"><a href="#/app/dataSource" ng-class="getMenuItemPropClasses()">数据连接</a></li>
				<li><a href="#/app/tableConfig/list" ng-class="getMenuItemPropClasses()">表单配置</a></li>
				<li class="dropdown">
					<a class="dropdown-toggle" data-toggle="dropdown">
						测试 <b class="caret"></b>
					</a>
					<ul class="dropdown-menu">
						<li><a href="#">Java</a></li>
						<li><a href="#">Net</a></li>
						<li><a href="#/app/dataSource">Ionic</a></li>
						<li class="divider"></li>
						<li><a href="#">Android</a></li>
						<li class="divider"></li>
						<li><a href="#">IOS</a></li>
					</ul>
				</li> -->
			</ul>
		</div>
	</div>
</nav>
<script id="menuTemplate.html" type="text/ng-template">
	<a ng-if="item.path != ''" ng-href="{{$state.href(item.path, item.params)}}">
    	{{item.name}}	
	</a>
	<a ng-if="item.path === ''" class="dropdown-toggle" data-toggle="dropdown">
		{{item.name}}<b class="caret"></b>
    </a>
	<ul ng-if="item.submenu" class="dropdown-menu">
    	<li ng-class="getMenuItemPropClasses(item)" ng-repeat="item in item.submenu" ng-include="'menuTemplate.html'"></li>
    </ul>
</script>
<script type="text/javascript">
	$(function(){
		$("#menu-navbar-collapse a[class!='dropdown-toggle']").on('click', function(){
			
			$('#menu-navbar-collapse li').removeClass('active');
			$(this).parents('li').addClass('active');
		});
	});
</script>
<script type="text/javascript" src="js/common/menu.js"></script>